﻿<%@ Page Theme="default2" Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs"
    Inherits="Demo_Skin01.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script language="javascript">

        function ChangeTheme(themeName) {
            var cssid = document.getElementsByTagName("link");
            for (var i = 0; i < cssid.length; i++)
                cssid[i].href = cssid[i].href.toLowerCase().replace(new RegExp("(/App_Themes/)(.*)(/)", "gi"), "$1" + themeName + "$3");
            //Lưu vào cookie để kiểm tra ở server
            document.getElementById('magicFrame').src = '/Admin/ChangeThemeHidden.aspx?theme=' + themeName;
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        this is the sample text.
        <br />
        <asp:Button ID="Button1" runat="server" BackColor="#00CC00" Text="Button" />
        <asp:TextBox ID="TextBox1" runat="server" ForeColor="#00CC00"></asp:TextBox>
        <asp:Label ID="Label1" runat="server" BackColor="#00CC00" Text="Label"></asp:Label>
        <br />
        <br />
    </div>
    <div class="themes">
        <a href="javascript:void(0)" onclick="ChangeTheme('Admin')" class="theme_default">theme 1</a>&nbsp;&nbsp;
        <a href="javascript:void(0)" onclick="ChangeTheme('default2')" class="theme_blue">theme 2</a>
        <img src="" alt="" title="" border="0" />
    </div>
    </form>
</body>
</html>
